package com.atguigu.boot.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:朱思博
 * @date:2021/5/11-{20:05}
 */
@RestController
@EnableConfigurationProperties
public class ProfileController {

    @Value("${person.name:默认李四}")
    private String name;

    @GetMapping("/profileName")
    public String getProfileName() {
        return name;
    }
}

